
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
-- --------------------------------------------------
-- Date Created: 09/09/2015 08:57:07
-- Generated from EDMX file: C:\Users\c\Desktop\TimeTableOne\Model\TimeTable.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [TimeTable];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------


-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[教师Set]', 'U') IS NOT NULL
    DROP TABLE [dbo].[教师Set];
GO
IF OBJECT_ID(N'[dbo].[学院Set]', 'U') IS NOT NULL
    DROP TABLE [dbo].[学院Set];
GO

-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table '教师Set'
CREATE TABLE [dbo].[教师Set] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [姓名] nvarchar(max)  NOT NULL,
    [工号] nvarchar(max)  NOT NULL,
    [电话号码] nvarchar(max)  NOT NULL
);
GO

-- Creating table '学院Set'
CREATE TABLE [dbo].[学院Set] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [名称] nvarchar(max)  NOT NULL,
    [地址] nvarchar(max)  NOT NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [Id] in table '教师Set'
ALTER TABLE [dbo].[教师Set]
ADD CONSTRAINT [PK_教师Set]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table '学院Set'
ALTER TABLE [dbo].[学院Set]
ADD CONSTRAINT [PK_学院Set]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------